<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("cart:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("cart:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("cart:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form :model="cart" :label-width="80">
            <Form-item label="会员Id" prop="userId">
                <i-input v-model="cart.userId" placeholder="会员Id"/>
            </Form-item>
            <Form-item label="sessionId" prop="sessionId">
                <i-input v-model="cart.sessionId" placeholder="sessionId"/>
            </Form-item>
            <Form-item label="商品Id" prop="goodsId">
                <i-input v-model="cart.goodsId" placeholder="商品Id"/>
            </Form-item>
            <Form-item label="商品序列号" prop="goodsSn">
                <i-input v-model="cart.goodsSn" placeholder="商品序列号"/>
            </Form-item>
            <Form-item label="产品Id" prop="productId">
                <i-input v-model="cart.productId" placeholder="产品Id"/>
            </Form-item>
            <Form-item label="产品名称" prop="goodsName">
                <i-input v-model="cart.goodsName" placeholder="产品名称"/>
            </Form-item>
            <Form-item label="市场价" prop="marketPrice">
                <i-input v-model="cart.marketPrice" placeholder="市场价"/>
            </Form-item>
            <Form-item label="零售价格" prop="retailPrice">
                <i-input v-model="cart.retailPrice" placeholder="零售价格"/>
            </Form-item>
            <Form-item label="数量" prop="number">
                <i-input v-model="cart.number" placeholder="数量"/>
            </Form-item>
            <Form-item label="规格属性组成的字符串，用来显示用" prop="goodsSpecifitionNameValue">
                <i-input v-model="cart.goodsSpecifitionNameValue" placeholder="规格属性组成的字符串，用来显示用"/>
            </Form-item>
            <Form-item label="product表对应的goods_specifition_ids" prop="goodsSpecifitionIds">
                <i-input v-model="cart.goodsSpecifitionIds" placeholder="product表对应的goods_specifition_ids"/>
            </Form-item>
            <Form-item label="" prop="checked">
                <i-input v-model="cart.checked" placeholder=""/>
            </Form-item>
            <Form-item label="商品图片" prop="listPicUrl">
                <i-input v-model="cart.listPicUrl" placeholder="商品图片"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/shop/cart.js?_${date.systemTime}"></script>
</body>
</html>